package org.hawk.gwtppc.webtest.tests.methodsuite;

import org.hawk.gwtppc.webtest.common.Asserts;
import org.hawk.gwtppc.webtest.common.Test;
import org.hawk.gwtppc.webtest.tests.mock.GenericClassMock;
import org.hawk.gwtppc.webtest.tests.mock.SubClassMock2;
import org.hawk.gwtppc.webtest.tests.mock.SubClassMock3;

public class IsVarArgsTest implements Test {

	public void run() throws Throwable {
		Asserts.assertFalse(SubClassMock2.class.getDeclaredMethod("processValue").isVarArgs());
		Asserts.assertTrue(SubClassMock3.class.getDeclaredMethod("varArgsMethod", String[].class).isVarArgs());
				
		Asserts.assertFalse(GenericClassMock.class.getDeclaredMethod("getSomeValue", Object.class, 
				Object.class, Class.class).isVarArgs());
		Asserts.assertTrue(GenericClassMock.class.getDeclaredMethod("getArray", String.class, 
				Object[].class).isVarArgs());
	}

	public String getName() {
		return "isVarArgs()";
	}

}
